﻿using RAP.Framework.Libary.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RAP.Framework.Libary.SqlTaskParser.Parsers
{
	/// <summary>
	/// @trans解析器，指定当前指令之后的SQL语句是否开启数据库事务
	/// </summary>
	public class TansactionTokenParser : ExpressionTokenParser
	{
    public override void ParseToken( SqlParseContext context )
		{
			//处理数据源标识 @trans;
			var currentTask = ( context.CurrentTask != null ? context.CurrentTask : context.CreateSqlTask() );
			currentTask.Trans = true;
		}
	}
}
